<div class="sitemap">
	<h1  class="title"><?php echo $this->translate('siteMap')?></h1>
	
	<?php 
	$names = array(
		'barrio' => 'byDistrict',
		'cocina' => 'byCuisine',
		'comida' => 'byFood',
		'tipo' 	 => 'byType',
	);
	
	foreach ($this->negociosPorTag as $tipo=>$data){
		
	    if($tipo == 'barrio'){
            continue;
        }
	    
		echo '<h2>'. $this->translate($names[$tipo]).'</h2>';
		echo '<ul>';
		
		foreach ($data as $dat){
			
			$tag = $dat['tag'];
			$num = $dat['num'];
			
			
			$tagName = $this->varUrl( $tag->nombre );
			
			$url = $this->url(array('tagName' => $tagName), $tipo);
			
			echo "<li><a href='{$url}'>{$tag->nombre} ({$num})</a></li>";
			
		}
		
		
		echo '</ul>';
	
	}	
	
	?>
	<h2 class="clear"><?php echo $this->translate('cities')?></h2>
	<ul id="listadoCiudades">
	<?php 
	
	foreach ( $this->ciudades as $ciudad){
		
		$url = $this->url(
		    array(
		    	'ciudad' => $this->varUrl( $ciudad->nombre ), 
		    	'provincia' => $this->varUrl( $ciudad->provincia )), 'ciudad');
		
		
		echo "<li><a href='{$url}'>{$ciudad}</a></li>";
		
	}
	?>
	</ul>
	<h2 class="clear"><?php echo $this->translate('commerces')?></h2>
	<ul id="listadoNegocios">
	<?php 
	foreach ( $this->negocios as $negocio){
		
		$url = $this->url(array('negocioUrl'=>$negocio->url), 'negocio');
		
		echo "<li><a href='{$url}'>{$negocio->nombre}</a></li>";
		
	}
	?>
	</ul>
	<div class="clear"></div>
</div>
<style>


</style>


<?php 
$this->renderToPlaceholder('side/box-about.phtml','side');
$this->renderToPlaceholder('side/box-commerces.phtml','side');
$this->renderToPlaceholder('side/box-info-help.phtml','side');

$this->headTitle()->append( $this->translate('meta-title-sitemap') );
$this->headMeta()->appendName('keywords', $this->translate('meta-keywords-sitemap') );
$this->headMeta()->appendName('description', $this->translate('meta-description-sitemap'));
